<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
</head>
<meta http-equiv="content-type" content="text/html; charset= UTF-8" />
<title>nonzero1.0 by nodethirtythree</title>
<meta name="keywords" content="" />
<meta name="description" content="" />


</head>
<body>
	<div id="header"></div>

	<div id="main">
		<script type="text/javascript"
			src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
			
		</script>
		<div></div>
		<form id="textbox">
			<input type="text" id="target" name="find" value="종로돈까스"> <input
				id="button1" type="button" value="o k">
		</form>
		종로돈까스
		<script>
			alert("success");
			$("#button1")
					.bind(
							'click',
							function test() {
								console.log("click");
								console.log("aaa: "+$('#target').val());
								var target = encodeURIComponent($('#target').val());
								console.log(target);
								var targetURL = "http://apis.daum.net/search/blog?q="
										+ target
										+ "&apikey=b2e1fe0775b1a9b8e564aab3b879ffdbba05009f";
								console.log(targetURL);
								
								$.ajax({
									type:'get',
									url: targetURL,
									success : function(data) {
										alert("success");
										console.log("success");
									}
								})
							});

							
		</script>
	</div>
	<div id="list"></div>
	<div id="aside"></div>
	<div id="footer" class="fixed"></div>
</body>
</html>